﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BodyMasterPage.Master"
    CodeBehind="wfTablaGenBnd.aspx.cs" Inherits="MG.wfTablaGenBnd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript">

        $(document).ready(function () {
            Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoaded)
        });

        function PageLoaded(sender, args) {
            ResizeGrid();
            MessageOnPostback();
        }

        function ResizeGrid() {
            internalGridResize("<%= grdList.ClientID %>");
        }
        
        function demotokenfunction() {
            var vartoken = $("#textFilter").tokenInput("get");
            document.getElementById("<%=hdnFilter.ClientID%>").value = JSON.stringify(vartoken);
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div class="DataHeader">
        <table id="TableDataHeader" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td>
                <table width="100%" cellpadding="0" cellspacing="2">
                        <tr>
                            <td rowspan="3">
                                <esd:esdFilterText ID="textFilter" runat="server" />
                            </td>
                            <td style="width: 90px;">
                                <esd:esdButton ID="bttClear" runat="server" Text="Limpiar" Width="80px"></esd:esdButton>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <esd:esdButton ID="bttSearch" runat="server" Text="Buscar" Width="80px" OnClick="bttOk_Click">
                                </esd:esdButton>
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width: 5px;">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>        
        </table>
    </div>
    <div class="DataDetail">
        <esd:esdGridView CssClass="esdGridView" ID="grdList" runat="server" ScrollWidth="100%"
            Width="100%" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" DataKeyNames="RowNumber"
            OnRowCommand="grdList_RowCommand">

            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="grdBttCmdEdit" CommandName="CmdEdit" CommandArgument="<%# Container.DataItemIndex %>"
                            runat="server" ImageUrl="../Images/Icons/Enabled/Edit.png" ToolTip="Modificar el Registro" />
                    </ItemTemplate>
                    <HeaderStyle Width="22px" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
               <%-- <asp:BoundField DataField="idTabla" HeaderText="Codigo"></asp:BoundField>--%>
               <asp:TemplateField>
                  <HeaderTemplate>
                    <esd:esdFilterPanel ID="idTabla" 
                        Identity="a.idTabla" 
                        runat="server" 
                        Title="Codigo" 
                        ControlToken="textFilter" 
                        FilterType="esdDateTexbox" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("idTabla")%>
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField>
                  <HeaderTemplate>
                    <esd:esdFilterPanel ID="dsTabla" 
                        Identity="a.dsTabla" 
                        runat="server" 
                        Title="Descripcion" 
                        ControlToken="textFilter" 
                        FilterType="esdDateTexbox" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("dsTabla")%>
                    </ItemTemplate>
               </asp:TemplateField>
                <%--<asp:BoundField DataField="dsTabla" HeaderText="Descripcion"></asp:BoundField>--%> 
            </Columns>
            <EmptyDataTemplate>
                <div id="gridempty">
                    <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                    &nbsp;No existen registros para esta solicitud.
                </div>
            </EmptyDataTemplate>
        </esd:esdGridView>
    </div>
    <asp:HiddenField ID="hdnFilter" runat="server" />
    <asp:HiddenField ID="hdnMsgOPB" runat="server" />
     </ContentTemplate> 
</asp:UpdatePanel>
</asp:Content>
